package com.qf.agro.controller;

import com.qf.agro.common.ResultInfo;
import com.qf.agro.pojo.SysLog;
import com.qf.agro.service.SysLogService;
import com.qf.agro.service.SysRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 10202
 * @version V1.0
 * @Project smart-agriculture-parent
 * @Package com.qf.agro.controller
 * @Date 2023/7/3 11:43
 */
@RestController
public class SysLogController {

    private final SysLogService sysLogService;

    public SysLogController(SysLogService sysLogService) {
        this.sysLogService = sysLogService;
    }

    @GetMapping("/sys/log/page")
    public ResultInfo getPage(@RequestParam( name = "page",defaultValue = "1") int page,
                              @RequestParam( name = "pageSize",defaultValue = "5") int pageSize){

        return sysLogService.getPage(page,pageSize);
    }
}
